package com.bifang.common.vo;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
import io.swagger.annotations.ApiModelProperty;
import java.io.Serializable;
import java.util.Date;
import java.util.List;
import java.util.Map;
import java.util.Set;
import lombok.Data;

@Data
public class SessionInfo implements Serializable {
    /** 用户id */
    @ApiModelProperty(notes = "用户id")
    private String userId;

    /** 用户名 */
    @ApiModelProperty(notes = "用户名")
    private String userName;

    /** 姓名 */
    @ApiModelProperty(notes = "姓名")
    private String fullName;

    @ApiModelProperty(value = "证件类型")
    private String cardType;
    /** 身份证 */
    @ApiModelProperty(notes = "证件号码")
    private String idcard;

    /** 电子邮箱 */
    @ApiModelProperty(notes = "电子邮箱")
    private String email;

    /** 手机 */
    @ApiModelProperty(notes = "手机")
    private String cellphone;

    /** 有效状态 0 禁用 1启用 */
    @ApiModelProperty(notes = "有效状态 0 禁用 1启用")
    private String status;
    /** 昵称 */
    @ApiModelProperty(notes = "昵称")
    private String nikeName;

    /** 性别 */
    @ApiModelProperty(notes = "性别")
    private String sex;

    @ApiModelProperty(notes = "性别名称")
    private String sexName;
    /** 出生日期 */
    @ApiModelProperty(notes = "出生日期")
    @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
    private Date birthday;

    /** 头像路径 */
    @ApiModelProperty(notes = "头像路径")
    private String photoPath;

    /** 用户类型 */
    @ApiModelProperty(notes = "用户类型")
    private String userType;

    @ApiModelProperty(notes = "用户类型名称")
    private String userTypeName;

    @ApiModelProperty(notes = "用户类型大类，用户登录页面跳转等判断")
    private String userTypeDivision;
    /** 所属组织id */
    @ApiModelProperty(notes = "人员当前所属组织id")
    private String orgId;

    @ApiModelProperty(value = "人员当前组织单位编码")
    private String orgCode;

    @ApiModelProperty(value = "人员当前组织单位名称")
    private String orgName;

    @ApiModelProperty(value = "人员当前统一社会信用代码")
    private String creditCode;
    /** 客户端id */
    @ApiModelProperty(notes = "客户端id")
    private String clientId;

    @ApiModelProperty(value = "应用名称")
    private String appName;

    /** 登入唯一标识 */
    @ApiModelProperty(notes = "登入唯一标识")
    private String loginKey;

    @ApiModelProperty(value = "是否实人认证：false 否 true 是")
    private Boolean realFlag;

    /** 登入类型 */
    @ApiModelProperty(notes = "登入类型")
    private String loginType;

    @ApiModelProperty(notes = "登入类型名称")
    private String loginTypeName;
    /** 第三方登入id */
    @ApiModelProperty(notes = "第三方登入id")
    private String openId;

    /** 登入方设备id */
    @ApiModelProperty(notes = "登入方设备id")
    private String equipmentId;
    /** 登入方设备类型 pc app */
    @ApiModelProperty(notes = "登入方设备类型 pc app")
    private String equipmentType;

    @ApiModelProperty(notes = "版本号")
    private String version;

    @ApiModelProperty(value = "系统编号")
    private String systemCode;

    @ApiModelProperty(value = "系统名称")
    private String systemName;

    @ApiModelProperty(notes = "过期时长")
    @JsonSerialize(using = ToStringSerializer.class)
    private long expireMinute;

    @ApiModelProperty(notes = "最新刷新时间")
    @JsonSerialize(using = ToStringSerializer.class)
    private long expireFreshTime;
    /** 是否校验权限 */
    @ApiModelProperty(notes = "是否校验权限")
    private boolean checkPrivilege = true;

    /** 菜单功能权限 */
    @ApiModelProperty(notes = "菜单功能权限")
    private Map<String, Set<String>> routers;

    /** 拥有的系统级权限 */
    @ApiModelProperty(notes = "拥有的系统级权限")
    private Set<String> systemPrivileges;

    /** 拥有的角色 */
    @ApiModelProperty(notes = "拥有的角色")
    private Set<String> roles;

    /** 接口权限 */
    @ApiModelProperty(notes = "接口权限,使用接口编码字段")
    private Set<String> apiList;

    /** 授权的用户组织权限 */
    @ApiModelProperty(notes = "授权的用户组织权限")
    private Set<String> orgIds;

    @ApiModelProperty(notes = "token缓存key")
    private String userTokenKey;

    @ApiModelProperty(notes = "是否人才：true 是 false 否")
    private Boolean talentFlag;

    @ApiModelProperty(notes = "人员id")
    @JsonSerialize(using = ToStringSerializer.class)
    private Long personId;

    @ApiModelProperty(value = "行政区划编码")
    private String areaCode;

    @ApiModelProperty(value = "行政区划名称")
    private String areaName;

    @ApiModelProperty(notes = "人员标签")
    private List<String> labelList;

    @ApiModelProperty(notes = "可选择登录的信息")
    private List<LoginInfo> loginInfoList;
}
